<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>游客登录界面</title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <%@include file="../includes/common.jsp" %>
    <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
    <%@ page contentType="text/html;charset=UTF-8" %>
    <link rel="stylesheet" type="text/css"  href="<c:url value="/js/css/spigPet.css"/>"/>
    <link rel="stylesheet" type="text/css" href="<c:url value="/js/css/jquery.tmailsilder.v2.css"/> "/>
</head>
<body>
<div class="container-fluid">
    <div class="row-fluid bg">
        <div class="row" style="margin-left: 0">
            <div class="span12">
                <%@include file="../includes/tourTop.jsp" %>
            </div>
        </div>
        <div style="float: left;width: 75%;">
            <div class="navbar" style="margin-bottom: 0;">
                <div class="row" style="margin-left: 0">
                    <div class="allcategorys">
                        <ul class="sublist" id="typeUl">
                        </ul>
                    </div>
                </div>
                <c:forEach items="${scormInfoList}" var="scorm">
                    <div  style="margin-left: 10px; width: 400px;height: 220px;float: left;" >
                        <div  style="width: 150px;height: 210px;float: left;">
                            <img src="${pageContext.request.contextPath}/img/backBooks.jpg" alt="书皮"   style="width: 150px;height: 210px;" >
                        </div>
                        <div style="margin-left: 10px;vertical-align: top;float: left;">
                            <table  style="width: 200px;height: 220px">
                                <tr>
                                    <td width="70px">书名:</td>
                                    <td id="scormName">${scorm.scormName}</td>
                                </tr>
                                <tr>
                                    <td width="70px">分数:</td>
                                    <td id="commentScore">${scorm.commentScore}</td>
                                </tr>
                                <tr>
                                    <td width="70px">类别:</td>
                                    <td id="courseType">${scorm.showCourseType}</td>
                                </tr>
                                <tr>
                                    <td width="70px">描述:</td>
                                    <td id="courseDisc">${scorm.courseDisc}</td>
                                </tr>
                                <tr>
                                    <td width="70px">上传者:</td>
                                    <td id="uploadUser">${scorm.uploadUser}</td>
                                </tr>
                                <tr>
                                    <td width="70px">上传时间:</td>
                                    <td id="uploadTime">${scorm.uploadTime}</td>
                                </tr>
                                <tr>
                                    <td width="70px">注册量:</td>
                                    <td id="registNum">${scorm.registNum}</td>
                                </tr>
                                <tr>
                                    <td width="70px">操作:</td>

                                    <td id="edit"><input type="button"    class="btn btn-primary" onclick="regStudy(${scorm.id})" value="注册学习"/></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>
        <div style="float: left;width: 300px;">
            <a href="tourist/calendar">日历</a>

                <!--小人只在首页显示 start*-->
                <div id="spig" class="spig">
                    <div id="message">正在加载中……</div>
                    <div id="mumu" class="mumu"></div>
                </div>
                <!--小人end*-->
        </div>
    </div>
</div>
<div id="dataEdit" closed="true" modal="true" style="overflow: hidden">
    <iframe style="width: 100%;height: 100%;" id="contentFrame" name="contentFrame" marginheight="0" marginwidth="0"
            frameborder="0" src="" allowTransparency="true">
    </iframe>
</div>

</body>
</html>
<script type="text/javascript" src="<c:url value="/js/spig.js"/> "></script>

<script type="text/javascript">
    var isindex = true;
    var visitor = "于潼";
    var dateConf = {
        language: 'zh-CN',
        startDate:'1914-1-1',
        endDate: new Date(),
        weekStart: 1,
        todayBtn: true,
        autoClose: true,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    };


    $(function(){
        $.ajax({
            url: basePath + "tourist/sortDo",
            dataType: "json",
            type: "POST",
            success: function (courseType){
                 for(var i=0;i<courseType.length;i++){
                     $("#typeUl").append("<li><h5 class='mcate-item-hd' style='text-align: center'><a onclick='courseType("+courseType[i].dictCode+")'  >"+courseType[i].dictValue+"</a></h5></li>");
                 }
            },
            error: doError
        })

    });
    function courseType(courseType){
        location.href="tourist/courseType?courseType="+courseType;

    }
    function regStudy(id){
        $.messager.alert("提示","请先登录平台！", "",function (){
           location.href="login";
        });

    }
</script>

